home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Internet 53
/
INTERNET53.iso
/
mac
/
SOFTWARE
/
MAC
/
MULTIMEDIA
/
SOUNDEFFECTS
/
SOUNDEFFECTS-092.HQX
/
SoundEffects 0.9.2 ƒ
/
SoundEffects Developer’s Kit
/
EmptyEffect ƒ
/
Empty.c
next >
Wrap
C/C++ Source or Header
|
1994-11-18
|
1KB
|
53 lines
#include "Glue.h"
#include "Empty.h"
pascal OSErr effect(ModParamsPtr modInfo, GluePtr glue, ModSettingsHandle *prefs)
{
StringHandle progressString;
short timeToCallProgress;
OSErr result = kModCancel;
// effect can receive in prefs either nil or a valid handle. If the effect does
// not have any settings, prefs will be nil and we won’t do anything with it.
UseResFile(modInfo->refNum);
// read the settings.
DisposHandle((Handle)*prefs);
*prefs = 0L;
// let’s load the string we’ll show in the progress window.
progressString = (StringHandle)Get1Resource('STR ', 128);
if (progressString == 0L)
return kModCouldntLoadMyRes;
// set up the progress window.
(*glue->ModSetupProgress)(modInfo, &timeToCallProgress, progressString);
ReleaseResource((Handle)progressString);
// if the selection is empty, select the whole channels.
if (modInfo->selSt == modInfo->selEnd)
{
modInfo->selSt = 0L;
(*glue->ModMaxRelChSize)(&modInfo, &modInfo->selEnd);
}
// process the sound from modInfo->selSt to modInfo->selEnd,
// from channel (*modInfo->hands)[ modInfo->selSt-1 ].chan
// to channel (*modInfo->hands)[ modInfo->selEnd-1 ].chan (inclusive).
(*glue->ModCloseProgress)();
return result;
}